import BrowserLogger from 'alife-logger'
const envMap = new Map([
  ['prod', 'prod'],
  ['test', 'local'],
  ['nts', 'daily'],
  ['pre', 'pre']
])
const environment = envMap.get(import.meta.env.MODE)

if (environment) {
  BrowserLogger.singleton({
    pid: 'fyw9n1jhpf@f07d745d63d8235',
    imgUrl: 'https://arms-retcode.aliyuncs.com/r.png?',
    sample: 10,
    enableLinkTrace: true, // 用于对api进行链路追踪
    enableApiCors: true, // 用于对api进行链路追踪,
    sendResource:true,
    behavior:true,
    enableSPA:true,
    environment,
    ignore: {
      ignoreApis: [
        /^vod\.cn-shanghai\.aliyuncs\.com/
      ]
    }
  })
}
